const Router = require('koa-router')

const menuController = require('../../controllers/menu')

const m = require('../../middlewares/admin_auth')

const router = new Router({ prefix: '/admin/api/v1/menu' })


router.get('/getList', m.auth,menuController.list);


router.post('/create', m.auth,menuController.create)


router.get('/detail/:id',m.auth, menuController.detail)


router.delete('/:id', m.auth, menuController.delete)


router.patch('/:id', m.auth, menuController.update)

module.exports = router
